// LinkOpenglDemoView.h : interface of the CLinkOpenglDemoView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_LINKOPENGLDEMOVIEW_H__23AE5BAB_B3A7_4C77_88C7_00F9FC0B7100__INCLUDED_)
#define AFX_LINKOPENGLDEMOVIEW_H__23AE5BAB_B3A7_4C77_88C7_00F9FC0B7100__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


class CLinkOpenglDemoView : public CView
{
protected: // create from serialization only
	CLinkOpenglDemoView();
	DECLARE_DYNCREATE(CLinkOpenglDemoView)

// Attributes
public:
	CLinkOpenglDemoDoc* GetDocument();

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CLinkOpenglDemoView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CLinkOpenglDemoView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:
    int m_GLPixelIndex;
	HGLRC m_hGLContext;
	BOOL SetWindowPixelFormat(HDC hDC);
	BOOL CreateViewGLContext(HDC hDC);
	void init();
	void RenderScene();
// Generated message map functions
protected:
	//{{AFX_MSG(CLinkOpenglDemoView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnDestroy();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnPaint();
	afx_msg void OnTimer(UINT nIDEvent);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in LinkOpenglDemoView.cpp
inline CLinkOpenglDemoDoc* CLinkOpenglDemoView::GetDocument()
   { return (CLinkOpenglDemoDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_LINKOPENGLDEMOVIEW_H__23AE5BAB_B3A7_4C77_88C7_00F9FC0B7100__INCLUDED_)
